package com.example.development.business.utils;

import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;

/**
 * @author: vince_zww
 * @date: 2020/8/25 22:23
 * @desceription:
 */
public class Demo01 {
    public static void main(String[] args) {
        Snowflake snowflake1 = IdUtil.getSnowflake(1, 1);
//        long id = snowflake.nextId();
        System.out.println(snowflake1.nextId());
        System.out.println(snowflake1.nextId());
        System.out.println(snowflake1.nextId());
        System.out.println(snowflake1.nextId());
        System.out.println(snowflake1.nextId());
        System.out.println("______________________________________________________________");
        Snowflake snowflake2 = IdUtil.getSnowflake(2, 2);
        System.out.println(snowflake2.nextId());
        System.out.println(snowflake2.nextId());
        System.out.println(snowflake2.nextId());
        System.out.println(snowflake2.nextId());
        System.out.println(snowflake2.nextId());
        System.out.println("______________________________________________________________");
        Snowflake snowflake3 = IdUtil.getSnowflake(3, 3);
        System.out.println(snowflake3.nextId());
        System.out.println(snowflake3.nextId());
        System.out.println(snowflake3.nextId());
        System.out.println(snowflake3.nextId());
        System.out.println(snowflake3.nextId());
    }
}
